package com.spring;

import com.spring.springInterface.BeanDefinition;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

public class DefaultBeanDefinition implements BeanDefinition {
    private String beanName;
    private Class<?> beanClass;
    private String scope = "singleton";
    private boolean lazyInit = false;
    private String destroyMethodName;
    private Map<String, Object> properties = new HashMap<>();

    public Map<String, Object> getProperties() {
        return properties;
    }

    public void setProperties(String configClass, Object clazz) {
        properties.put(configClass, clazz);
    }

    @Override
    public String getBeanName() {
        return beanName;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    @Override
    public Class<?> getBeanClass() {
        return beanClass;
    }

    public void setBeanClass(Class<?> beanClass) {
        this.beanClass = beanClass;
    }

    @Override
    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public boolean isLazyInit() {
        return lazyInit;
    }

    public String getDestroyMethodName() {
        return destroyMethodName;
    }

    public void setDestroyMethodName(String destroyMethodName) {
        this.destroyMethodName = destroyMethodName;
    }

}
